//
//(C) Copyright 2011 HongKong Airline.,Ltd. 
//
/**
 * publishNewsAction
 * 项目名称:代购系统
 * @author Mengxiangliang
 * 功能描述:
 * 历史版本:2013-01-04 v1.0.0 Mengxiangliang  创建:
 * @version [V1] 
 */
package com.gamutsoft.amb.publishnews.action;

import java.io.PrintWriter;
import java.util.List;
import java.util.Map;

import com.gamutsoft.amb.base.action.BaseAction;
import com.gamutsoft.amb.common.bean.QueryExample;
import com.gamutsoft.amb.common.constants.Constants;
import com.gamutsoft.amb.common.exception.BusinessException;
import com.gamutsoft.amb.menuinfo.service.IMenuinfoService;
import com.gamutsoft.amb.publishnews.model.PublishNews;
import com.gamutsoft.amb.publishnews.service.IPublishNewsService;


@SuppressWarnings({"serial","rawtypes"})
public class PublishNewsAction extends BaseAction {
	
	private PublishNews publishNews;
	
	private List<Map> publishNewsList;
	
	private IPublishNewsService publishNewsService;
	
	private String menuJson;
	
	private IMenuinfoService menuinfoService;
	
	private String menuCode;

	public String gotoHelpCenter()throws BusinessException, Exception {
		menuJson=menuinfoService.generateMenuStr(Constants.NEWS_HELP_CENTER);
		return"init_help_center";
	}
    /**
     * 获取数据
     */
	public String  forPublishNewsInfo()throws BusinessException, Exception {
		if(menuCode!=null && !"".equals(menuCode)){
			publishNews=publishNewsService.searchPublishNewsByClass(menuCode);
		}
		return "help_center_content";
	}
	/**
	 * @return the publishNews
	 */
	public PublishNews getPublishNews() {
		return publishNews;
	}

	/**
	 * @param publishNews the publishNews to set
	 */
	public void setPublishNews(PublishNews publishNews) {
		this.publishNews = publishNews;
	}

	/**
	 * @return the publishNewsList
	 */
	public List<Map> getPublishNewsList() {
		return publishNewsList;
	}

	/**
	 * @param publishNewsList the publishNewsList to set
	 */
	public void setPublishNewsList(List<Map> publishNewsList) {
		this.publishNewsList = publishNewsList;
	}


	/**
	 * @param publishNewsService the publishNewsService to set
	 */
	public void setPublishNewsService(IPublishNewsService publishNewsService) {
		this.publishNewsService = publishNewsService;
	}

	public String getMenuJson() {
		return menuJson;
	}

	public void setMenuJson(String menuJson) {
		this.menuJson = menuJson;
	}

	public IMenuinfoService getMenuinfoService() {
		return menuinfoService;
	}

	public void setMenuinfoService(IMenuinfoService menuinfoService) {
		this.menuinfoService = menuinfoService;
	}
	public String getMenuCode() {
		return menuCode;
	}
	public void setMenuCode(String menuCode) {
		this.menuCode = menuCode;
	}
	
}
